export function debounce(fn, delay) {
	let timer
	return function () {
		let that = this
		let args = arguments
		if (timer) {
			clearTimeout(timer)
		}
		timer = setTimeout(function () {
			timer = null
			fn.apply(that, args)
		}, delay)
	}
}
export function throttle(fn, interval) {
	let timer
	return function () {
		let that = this
		let args = arguments
		if (timer) {
			return
		}
		timer = setTimeout(() => {
			timer = null
		}, interval)
		fn.apply(that, args)
	}
}
